package com.base.cn.platform.os.service.manage.sysUser;

import com.base.cn.platform.os.service.FeignAuthConfig;
import com.base.cn.platform.os.service.manage.BaseService;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

/**
 * 登录日志接口
 *
 * @author s.li
 * @create 2018-04-12-13:45
 */
@FeignClient(name = BaseService.appName,configuration = FeignAuthConfig.class)
public interface SysLoginLogService extends BaseService {

    /**
     * 保存登录日志
     * @param sysLoginLog
     */
    @RequestMapping(contextPath + "/saveSysLoginLog")
    void saveSysLoginLog(@RequestBody Map<String, Object> sysLoginLog);

    /**
     * 查询用户登录日志列表
     * @param sysLoginLog 查询条件
     * @param currentPage 页码
     * @param sysUserData 是否设置用户数据
     * @return PageInfo<SysLoginLog>
     */
    @RequestMapping(contextPath + "/findSysLoginListPage")
    Map<String,Object> findSysLoginListPage(@RequestBody Map<String, Object> sysLoginLog,
                                            @RequestParam("currentPage") int currentPage,
                                            @RequestParam(value = "sysUserData", required = false, defaultValue = "false") boolean sysUserData);
}
